<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>公寓列表</title>
    <link rel="stylesheet" href="/css/bootstrap.css" th:href="@{/css/bootstrap.css}"/>
</head>
<body class="container">
<br/>
<h1>我的公寓列表</h1>
<br/><br/>
<div class="with:80%">
    <table class="table table-hover">
        <thead>
        <tr>
            <th>序号</th>
            <th>房东姓名</th>
            <th>房屋地址</th>
            <th>公寓图片</th>
            <th>公寓价格</th>
            <th>公寓类型</th>
            <th>公寓状态</th>
            <th>公寓简介</th>
            <th>修改</th>
            <th>删除</th>
        </tr>
        </thead>
        <tbody>
        <tr  th:each="apartment : ${apartment}">
            <th scope="row" th:text="${apartment.id}"></th>
            <td th:text="${apartment.username}"></td>
            <td th:text="${apartment.address}"></td>
            <td><img th:src="@{${apartment.picture}}"  width="100" height="100"></td>
            <td th:text="${apartment.price}"></td>
            <!--      <td th:text="${apartment.price}"></td>-->
            <td th:text="${apartment.apartment_type}"></td>
            <td th:text="${apartment.apartment_statu}"></td>
            <td th:text="${apartment.content}"></td>
            <td><a th:href="@{/admin/toEdit(id=${apartment.id},username=${apartment.username})}">编辑</a></td>
            <td><a th:href="@{/admin/delete(id=${apartment.id})}">删除</a></td>
        </tr>
        </tbody>
    </table>
</div>
<div class="form-group">
    <div class="col-sm-2 control-label" >
        <a th:href="@{/landlord/toAddApartment}" class="btn btn-info">添加</a>
    </div>
</div>
</body>
</html>